package kz.kstu.aecdemo.desktop.util.health;


import java.awt.*;

/**
 * @author Filipp_Stankevich
 *         created: 12.10.11 22:31
 */
public class HealthManager {

    private static HealthManager instance;

    private HealthManager() {}

    public static HealthManager getInstance() {
        if (instance == null) {
            instance = new HealthManager();
        }
        return instance;
    }

    public void logAnyError() {
        Thread.setDefaultUncaughtExceptionHandler(new DefaultErrorHandler());
        EventQueue eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue();
        eventQueue.push(new EventQueueProxy());
    }
}
